<?php

namespace App\Http\Controllers;

use Laravel\Lumen\Routing\Controller as BaseController;
use Symfony\Component\HttpKernel\Exception\HttpException;

class Controller extends BaseController
{
    public function error($message, $statusCode)
    {
        throw new HttpException($statusCode, $message);
    }

    public function success($data = null)
    {
        return response()->json($data);
    }
}
